package com.itheima.service.Checkitem.impl;

import com.itheima.entity.Checkitem;
import com.itheima.mapper.CheckitemMapper;
import com.itheima.service.Checkitem.CheckitemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class CheckitemServiceImpl implements CheckitemService {
    @Autowired
    private CheckitemMapper checkitemMapper;

    @Override
    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)//开启事务
    public List<Checkitem> findAll() {
        return checkitemMapper.findAll();
    }
}
